<?php
require("./include/fpdf/fpdf.php");
include "_fpdf_mc_table.php";

//Instanciation of inherited class
$pdf=new PDF();
$pdf->AliasNbPages();
$pdf->AddPage('L');
$pdf->SetFont('Times','',9);
$pdf->SetWidths($w);


// Set the fields from DB == table header ....
$fields = $header;
$i=0;
$data = array();
// fetch all data into array ...
$fill = true;
while($d = $res->FetchNextObject()){
$i++;
	$x = 0;
	$data = array();
	$data[] = $i;
	for($z=1; $z<count($fields); $z++){
		$data[] = $d->$fields[$z];
	}
	$pdf->Row($data, $fill);
	$fill=!$fill;
}
$pdf->Output();
?>